home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 8
/
FM Towns Free Software Collection 8.iso
/
t_os
/
artemis
/
artsrc2
/
ginit2.asm
< prev
next >
Wrap
Assembly Source File
|
1994-06-01
|
2KB
|
93 lines
; 私製ライブラリ パート2
; (c) MATSUUCHI Ryosuke in Dec,1992
;
; ginit2.asm : 初期化
.386p
public _ginit, ginit, _egbwork
public _callEGB
public _egbwork, _scrmod, _wrtpage, _nowscrmod
assume cs:cseg, ds:dseg
dseg segment
align 4
__dmy__ db 4 dup (0)
_egbwork db 1536 dup (0) ;EGBライブラリ用ワークエリア
_scrmod dd 0 ;ページ0の画面モード
dd 0 ;ページ1の画面モード
dd 0 ;仮想画面0の画面モード
dd 0 ;仮想画面1の画面モード
dd 0 ;仮想画面2の画面モード
dd 0 ;仮想画面3の画面モード
_nowscrmod dd 0 ;現在ページの画面モード
_wrtpage dd 0
dseg ends
cseg segment
;---------------------------------------------------------------
; _callEGB : グラフィックBIOSの呼び出し
; in AH 機能コード
; DS:ESI パラメータ領域のアドレス
;---------------------------------------------------------------
align 4
_callEGB proc
push edi
push ds
pop gs
mov edi,offset _egbwork
push dword ptr 0110h
pop fs
call pword ptr fs:[20h]
pop edi
ret
_callEGB endp
;---------------------------------------------------------------
; _ginit : 私製ライブラリの初期化
; in none
; out none
;
; void ginit()
;---------------------------------------------------------------
ginit proc near
_ginit:
push eax
push ecx
xor ax,ax
mov ecx,1536
call _callEGB
mov eax,3
mov [_nowscrmod],eax
mov [_scrmod+0],eax
mov [_scrmod+4],eax
sub eax,eax
mov [_wrtpage],eax
pop ecx
pop eax
ret
ginit endp
;---------------------------------------------------------------
; __setvadr : VRAM(または仮想VRAM)のポインタの設定
; ※(私製ライブラリの内部ルーチン)
; in none
; out none
;---------------------------------------------------------------
cseg ends
end